package com.cloudkinto.service.company.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class WarehouseOrderCreateReq {
    @ApiModelProperty(value = "服务商 code", required = true)
    private String cwProviderCode;
    @ApiModelProperty(value = "服务商名称", required = true)
    private String cwProviderName;
    @ApiModelProperty(value = "对接仓仓库的货主 code", required = true)
    private String cwCustomCode;
    @ApiModelProperty(value = "对接仓仓库仓库的授权 key", required = true)
    private String cwAppKey;
    @ApiModelProperty(value = "对接仓仓库仓库的授权 token", required = true)
    private String cwAccessToken;
    @ApiModelProperty(value = "平台,默认 Temu", required = true)
    private String platform;
    @ApiModelProperty(value = "对接仓仓库编码", required = false)
    private String cwWarehouseCode;
    @ApiModelProperty(value = "合作仓的实际仓库名称", required = false)
    private String cwWarehouseName;
    @ApiModelProperty(value = "合作仓的实际仓库区域二字码", required = false)
    private String cwWarehouseRegionCode;

    @ApiModelProperty(value = "可以用的物流产品列表", required = true)
    private List<String> logisticsProductList;

    @ApiModelProperty(value = "店铺 id")
    private String mallId;

    @ApiModelProperty(value = "temu 的批次订单号，可作为幂等健", required = true)
    private String batchOrderNo;
    @ApiModelProperty(value = "预计送达时间（时间戳，秒级）", required = false)
    private Integer estimatedDeliveryTime;

    @ApiModelProperty(value = "预计发货时间（时间戳，秒级）", required = false)
    private Integer estimatedShippingTime;

    @ApiModelProperty(value = "订单列表信息(相同的 O 单可能存在多个 SKU)", required = true)
    private List<Order> orderList;

    @ApiModelProperty(value = "收件人信息", required = true)
    private Consignee consignee;


    @ApiModelProperty(name = "创建订单时间，秒级时间戳", required = true)
    private Integer createOrderTs;


    @Data
    public static class Order {
        //Q5、【批次单和 O 单的关系】
        //A：一个批次单下会存在多个 O 单，一个 O 单下会存在多个 SKU，O 单为最小颗粒度，不允许拆单；不
        //同 O 单下也可能存在相同的 SKU，这种情况需要自行合单；
        @ApiModelProperty(name = "O 单列表(不同的 O 单可能存在相同的仓 SKU)", required = true)
        private String orderSn;
        //PO 单号
        private String parentOrderSn;
        @ApiModelProperty(name = "商品的 skuCode", required = true)
        private String cwSkuCode;
        @ApiModelProperty(name = "商品的sku数量", required = true)
        public String qty;

    }


    @Data
    public static class Consignee {
        @ApiModelProperty(name = "收货人姓", required = true)
        private String receiptName;
        @ApiModelProperty(name = "国家/地区二字码", required = true)
        private String regionCode;
        @ApiModelProperty(name = "州或省", required = true)
        private String stateName;
        @ApiModelProperty(name = "城市", required = true)
        private String cityName;
        @ApiModelProperty(name = "区/县", required = false)
        private String district;
        @ApiModelProperty(name = "详细地址行 1", required = true)
        private String addressLine1;
        @ApiModelProperty(name = "详细地址行 2", required = false)
        private String addressLine2;
        @ApiModelProperty(name = "邮编", required = true)
        private String postCode;
        @ApiModelProperty(name = "门牌号", required = false)
        private String houseNo;
        @ApiModelProperty(name = "收货人手机号", required = false)
        private String mobile;
        @ApiModelProperty(name = "收货人邮箱", required = false)
        private String email;
    }
}
